/*
 * Copyright (c) 2010-2013 Ruben Chakhmakhchyan. All rights reserved.
 * 
 * This file contains Original Code and/or Modifications of Original Code
 * as defined in and that are subject to the Eclipse Public License
 * Version 1.0 (the 'License'). You may not use this file except in
 * compliance with the License. Please obtain a copy of the License at
 * http://opensource.org/licenses/EPL-1.0 and read it before using this file.
 */

#include "image_acquisition_model.h"
#include "image_site.h"
#include "plugin_model_impl.h"
#include "wia_model_impl.h"
#include "twain_model_impl.h"

#if defined _TEST
#include "test_model_impl.h"
#endif


ImageAcquisitionModel* CreateImageAcquisitionModel( ImageSite* imageSite, MessageListener* messageListener, int typeId )
{
    ImageAcquisitionModel* model = NULL;

#if !defined _TEST
    switch ( typeId )
    {
    case DriverModelTypeDefault: model = NULL; break;
    case DriverModelTypeWia: model = new WiaModel( imageSite, messageListener ); break;
    case DriverModelTypeTwain: model = new TwainModel( imageSite, messageListener ); break;
    default:
        model = NULL;
        break;
    }
#else
    model = new TestDriverModel( imageSite, messageListener );
#endif
    return model;
}
